package simulation;

/**
 * 门类
 */
public class Door {
    public final Position posA;
    public final Position posB;

    public Door(Position posA, Position posB) {
        this.posA = posA;
        this.posB = posB;
    }

    public Position getRandomPos() {
        double x = MathUtil.randomDouble(posA.getX(), posB.getX());
        double y = MathUtil.randomDouble(posA.getY(), posB.getY());
        return new Position(x, y);
    }
}
